//
//  NSDictionary+Extend.m
//  XLDoctor
//
//  Created by longma on 2018/12/27.
//  Copyright © 2018年 XLH. All rights reserved.
//

#import "NSDictionary+MJUI.h"

@implementation NSDictionary (MJUI)

- (NSString *)mj_dictionaryConvertToString{
    
    NSError *parseError = nil;
    NSData *jsonData = [NSJSONSerialization dataWithJSONObject:self options:NSJSONWritingPrettyPrinted error:&parseError];
    
    return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
}

/// 字典是否包含某个 key
- (BOOL)mj_containsKey:(NSString *)key {
    return [self.allKeys containsObject:key];
}
@end
